package org.practice;

import java.util.Arrays;

/**
 * @author zch
 */
public class FindMaximum {

    public static void main(String[] args) {
        int[] array = new int[]{3,4,5,2};
        System.out.println(find(array));
    }

    public static int find(int[] array) {
        Arrays.sort(array);
        int len = array.length;
        return (array[len-2] -1) * (array[len - 1] - 1);
    }
}
